package com.lyc.heihei;

public class Demo04 {
    //两个数的最大公约数求出来  (最后通分）
    public static void main(String[] args) {
        int result = gongYueShu(81,3);
        System.out.println(result);
    }
    public static int gongYueShu(int a, int b) {
        while (b != 0) {
            int temp = b;
            b = a % b;
            a = temp;
        }
        return a;
    }
}
